package drg_group.zhejiang_2022.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.zhejiang_2022.Base;
import drg_group.zhejiang_2022.MedicalRecord;
import drg_group.zhejiang_2022.DRG.MDCC_DRG;

public class CC1 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={};
        String[] adrg_zd1={};
        String[] adrg_ss={"10.0x00x001","10.1x00x001","10.1x00x002","10.2900x001","10.3101","10.3102","10.3200","10.3201","10.3300x002","10.3301","10.3302","10.4100x001","10.4101","10.4102","10.4200x001","10.4201","10.4202","10.4300x002","10.4400x001","10.4401","10.4402","10.4403","10.4900x001","10.4900x003","10.4901","10.4903","10.4904","10.5x01","10.6x00x001","10.6x00x002","10.9900x001","10.9900x003","10.9901","11.0x00","11.1x01","11.4100x001","11.4200","11.4300","11.4901","11.4902","11.4903","11.5100","11.5101","11.5200","11.5300x001","11.5900x001","11.5900x002","11.5901","11.6000x002","11.6000x003","11.6100","11.6200x002","11.6200x003","11.6300x001","11.6300x002","11.6400x001","11.6400x002","11.6900x001","11.6900x002","11.6900x003","11.6901","11.6902","11.7100x001","11.7100x002","11.7101","11.7102","11.7103","11.7104","11.7200x005","11.7300x001","11.7400x001","11.7500","11.7600","11.7900x001","11.7901","11.7902","11.7904","11.9100x001","11.9200x001","11.9900x001","11.9900x002","11.9901","12.0200x003","12.3400","12.5900x003","12.6100","12.6200","12.6500x003","12.6501","12.6502","12.6503","12.6901","12.8100","12.8200x001","12.8302","12.8303","12.8304","12.8400x002","12.8400x004","12.8401","12.8402","12.8403","12.8404","12.8500x002","12.8600x001","12.8701","12.8702","12.8703","12.8800x002","12.8801","12.8802","12.8900x001","12.8900x007","12.8901","12.8902","12.8903","12.8904","98.2200x001","98.2200x005"};
        String[] adrg_ss1={};
        
        if (true && record.ssList!=null && record.ssList.length>0 && Base.intersect(record.ssList,adrg_ss)){
            Base.groupMessages.putMessage(record.Index,"符合CC1入组条件，匹配规则：某一手术匹配");
                
            if (MDCC_DRG.CC11_group(record)){
                return "CC11";
            }
    
            if (MDCC_DRG.CC13_group(record)){
                return "CC13";
            }
    
            if (MDCC_DRG.CC15_group(record)){
                return "CC15";
            }

            return "CC1";
        }else{
            return "";
        }
    }
}

